package net.huashitong.ssydt.security.utils;


import net.huashitong.ssydt.security.entity.UserSession;

/**
 * @author huiyang.yu
 */
public class UserUtils {

    private static ThreadLocal<UserSession> userSession = new ThreadLocal<UserSession>();

    public static String getUserId(){
        return userSession.get().getUserId();
    }

    public static ThreadLocal<UserSession> getUserSession() {
        return userSession;
    }

    public static void setUserSession(ThreadLocal<UserSession> userSession) {
        UserUtils.userSession = userSession;
    }
}
